<template>
  <q-page class="q-pa-sm" style="max-width: 480px;min-width: 320px">
    <div class="text-bold q-pl-xs">入库</div>
    <q-separator class="q-mb-xs" />
    <div class="row q-mb-md">
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" color="primary" outline  stack  to="/wms/work/asn-arrived" v-if="fx.hasModifyRight('Wms.Work.Asn.Arrived')">
          <img src="../assets/asn_arrived.png" style="width: 40px;" >
          <div class="btn-fontsize">货已到仓</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/asn-checked" v-if="fx.hasModifyRight('Wms.Work.Asn.Checked')">
          <img src="../assets/asn_checked.png" style="width: 40px;" >
          <div class="btn-fontsize">点收完成</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/asn-receive" v-if="fx.hasModifyRight('Wms.Work.Asn.ReceiveGoods')">
          <img src="../assets/asn_receive.png" style="width: 40px;" >
          <div class="btn-fontsize">入库验收</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="center" color="primary" outline  stack to="/wms/work/putaway" v-if="fx.hasModifyRight('Wms.Work.Other.Putaway')">
          <img src="../assets/putaway.png" style="width: 40px;" >
          <div class="btn-fontsize">上架</div>
        </q-btn>
      </div>
    </div>

    <div class="text-bold q-pl-xs">出库</div>
    <q-separator class="q-mb-xs" />
    <div class="row q-mb-md">
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/qc" v-if="fx.hasModifyRight('Wms.Work.Order.PackQc')">
          <img src="../assets/qc.png" style="width: 40px;" >
          <div class="btn-fontsize">出库QC</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/pick" v-if="fx.hasModifyRight('Wms.Work.Order.Pick')">
          <img src="../assets/pick.png" style="width: 40px;" >
          <div class="btn-fontsize">拣货</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/pick-order" v-if="fx.hasModifyRight('Wms.Work.Order.Pick')">
          <img src="../assets/pick_order.png" style="width: 40px;" >
          <div class="btn-fontsize">订单拣货</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/collect" v-if="fx.hasModifyRight('Wms.Work.Order.Collect')">
          <img src="../assets/collect.png" style="width: 40px;" >
          <div class="btn-fontsize">集货</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/pack-labeling" v-if="fx.hasModifyRight('Wms.Work.Order.PackLabeling')">
          <img src="../assets/pack_labeling.png" style="width: 40px;" >
          <div class="btn-fontsize">贴标</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/pallet" v-if="fx.hasModifyRight('Wms.Work.Order.DoPallet')">
          <img src="../assets/pallet.png" style="width: 40px;" >
          <div class="btn-fontsize">打托</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/pack-consolidate" v-if="fx.hasModifyRight('Wms.Work.Order.PackConsolidate')">
          <img src="../assets/pack_consolidate.png" style="width: 40px;" >
          <div class="btn-fontsize">集箱</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/loading-up" v-if="fx.hasModifyRight('Wms.Work.Order.LoadingUp')">
          <img src="../assets/loading_up.png" style="width: 40px;" >
          <div class="btn-fontsize">上车</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/loading-up-pallet" v-if="fx.hasModifyRight('Wms.Work.Order.LoadingUp')">
          <img src="../assets/loading_up_pallet.png" style="width: 40px;" >
          <div class="btn-fontsize">上车(按托)</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/counting" v-if="fx.hasModifyRight('Wms.Inv.InvCounting.DoCounting')">
          <img src="../assets/counting.png" style="width: 40px;" >
          <div class="btn-fontsize">初盘功能</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/recounting" v-if="fx.hasModifyRight('Wms.Inv.InvCounting.DoCounting')">
          <img src="../assets/recounting.png" style="width: 40px;" >
          <div class="btn-fontsize">复盘功能</div>
        </q-btn>
      </div>
    </div>

    <div class="text-bold q-pl-xs">库存</div>
    <q-separator class="q-mb-xs" />
    <div class="row q-mb-md">

      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/move-with-note" v-if="fx.hasModifyRight('Wms.Inv.InvMove.Operate')">
          <img src="../assets/move_with_note.png" style="width: 40px;" >
          <div class="btn-fontsize">有单移库</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/move-without-note" v-if="fx.hasModifyRight('Wms.Inv.InvMove.Operate')">
          <img src="../assets/move_without_note.png" style="width: 40px;" >
          <div class="btn-fontsize">无单移库</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/whole-lpn-move-by-pda" v-if="fx.hasModifyRight('Wms.Work.Other.WholeLpnMove')">
          <img src="../assets/whole_lpn_move_by_pda.png" style="width: 40px;" >
          <div class="btn-fontsize">整栈板移库</div>
        </q-btn>
      </div>
      <div class="col-3 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline  stack to="/wms/work/loc" v-if="fx.hasModifyRight('Wms.Inv.Inventory.View')">
          <img src="../assets/loc.png" style="width: 40px;" >
          <div class="btn-fontsize">库存查询</div>
        </q-btn>
      </div>
    </div>
    <div class="text-bold q-pl-xs">我的</div>
    <q-separator class="q-mb-xs" />
    <div class="row q-mb-md">
      <div class="col-4 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline to="/comm/my/my-profile">
          <q-icon left size="md" name="account_circle" color="primary" />
          <div class="btn-fontsize">我的资料</div>
        </q-btn>
      </div>
      <div class="col-4 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline to="/comm/cfg/about">
          <q-icon left size="md" name="info" color="primary" />
          <div class="btn-fontsize">关于</div>
        </q-btn>
      </div>
      <div class="col-4 q-pa-xs">
        <q-btn class="full-width full-height" align="left" color="primary" outline to="/wms/cfg/pda-config">
          <q-icon left size="md" name="settings_applications" color="primary" />
          <div class="btn-fontsize">设置</div>
        </q-btn>
      </div>
    </div>
  </q-page>
</template>

<script lang="ts">
export default {
  name: 'PageIndex'
}
</script>

<script lang="ts" setup>
import { useQuasar } from 'quasar'

const myIcons = {
  'asn-arrived': 'img:/src/assets/asn_arrived.png',
  'asn-checked': 'img:/src/assets/asn_checked.png',
  'asn-receive': 'img:/src/assets/asn_receive.png',
  'putaway': 'img:/src/assets/putaway.png',
  'qc': 'img:/src/assets/qc.png',
  'pick': 'img:/src/assets/pick.png',
  'pick-and-qc': 'img:/src/assets/pick_and_qc.png',
  'collect': 'img:/src/assets/collect.png',
  'pack-labeling': 'img:/src/assets/pack_labeling.png',
  'pack-consolidate': 'img:/src/assets/pack_consolidate.png',
  'loading-up': 'img:/src/assets/loading_up.png',
  'move-with-note': 'img:/src/assets/move_with_note.png',
  'move-without-note': 'img:/src/assets/move_without_note.png',
  'loc': 'img:/src/assets/loc.png',
  'pick-order': 'img:/src/assets/pick_order.png',
  'loading-up-pallet': 'img:/src/assets/loading_up_pallet.png',
  'counting': 'img:/src/assets/counting.png',
  'recounting': 'img:/src/assets/recounting.png',
  'whole-lpn-move-by-pda': 'img:/src/assets/whole_lpn_move_by_pda.png',
}

const $q = useQuasar()
$q.iconMapFn = (iconName) => {
  const icon = myIcons[iconName]
  if (icon !== void 0) {
    return { icon: icon }
  }
}
const fx = $f
</script>

<style lang="sass" scoped>
.btn-fontsize
  font-size: 12px

</style>
